 FC =ifort 
 FFLAGS = -O3  
 AR = ar 
 LIB = -L/home/wangwei/intel/mkl/10.1.0.015/lib/em64t \
	 -lmkl_intel_lp64 -lmkl_blacs_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread 
 FFT = 
 #------------------------------------------------------------------------------- 
 # Suffix rules 
 #------------------------------------------------------------------------------- 
 .SUFFIXES: .o .f90 
 .f90.o: 
	$(FC) $(FFLAGS) -c $< 
  
 #------------------------------------------------------------------------------- 
 # Source files 
 #------------------------------------------------------------------------------- 
  
 SRC_modules = atominfo.f90 cellinfo.f90 constants.f90 
 SRC_main = main.f90 
 SRC_init = readin.f90 errread.f90 erropen.f90 writelog.f90 dotab.f90 crossab.f90 reciplat.f90 \
            memory.f90
#            potential.f90 genkvec.f90 filldist.f90 
 SRC = $(SRC_modules) $(SRC_main) $(SRC_init) 
  
 OBJ = $(SRC:.f90=.o) 
 EXE = eskit.x
  
 eskit.x :   $(OBJ) 
	 $(FC) $(FFLAGS) -o $(EXE) $(OBJ) $(LIB) $(FFT) 
  
 clean: 
	rm -f *.o *.mod *~ fort.* ifc* *.log $(EXE) 
 
